﻿using KingerRobot.PCRMES.Dao;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KingerRobot.PCRMES.Spi;

public interface IMesOrderService
{
    /// <summary>
    /// 获取所有MES订单
    /// </summary>
    /// <returns></returns>
    List<i_wms_production> QueryMesProductions();
    /// <summary>
    /// 清理产出数据
    /// </summary>
    /// <param name="productId"></param>
    /// <returns></returns>
    int ClearMesProductions(string productId);
    /// <summary>
    /// 更新状态
    /// </summary>
    /// <param name="wms_product"></param>
    /// <returns></returns>
    int UpdateMesProduction(i_wms_production wms_product);
    /// <summary>
    /// 锁定表
    /// </summary>
    /// <returns></returns>
    List<i_wms_lock> QueryMesLocks();
    /// <summary>
    /// 更新锁定表
    /// </summary>
    /// <param name="wmsLock"></param>
    /// <returns></returns>
    int UpdateWmsLock(i_wms_lock wmsLock);
    /// <summary>
    /// 查询订单
    /// </summary>
    /// <returns></returns>
    List<i_wms_order> QueryMesOrder();
    /// <summary>
    /// 清理出库订单数据
    /// </summary>
    /// <param name="productId"></param>
    /// <returns></returns>
    int ClearMesOutOrders(string orderId);

    /// <summary>
    /// 更新订单
    /// </summary>
    /// <param name="wmsOrder"></param>
    /// <returns></returns>
    int UpdateWmsOrder(i_wms_order wmsOrder);
    /// <summary>
    /// 保存任务完成订单
    /// </summary>
    /// <returns></returns>
    int SaveWmsOut(i_wms_out iWmsOut);
    /// <summary>
    /// 查询合格信息
    /// </summary>
    /// <returns></returns>
    List<i_wms_check> QueryWmsCheck();
    /// <summary>
    /// 更新同步结果
    /// </summary>
    /// <param name="check"></param>
    /// <returns></returns>
    int UpdateWmsCheck(i_wms_check check);
}
